<% layout('/layouts/default.html', {title: '开证未到单提醒', libs: ['dataGrid']}){ %>
<div class="main-content">
    <div class="box box-main">
        <div class="box-header">
            <div class="box-title">
                <i class="fa icon-notebook"></i> ${text('开证未到单提醒')}
            </div>
            <div class="box-tools pull-right">
                <a href="#" onclick="goBack()" class="btn btn-default" title="${text('返回')}"><i class="fa fa-back"></i> ${text('返回')}</a>
            </div>
        </div>
        <div class="box-body">
            <#form:form id="searchForm" model="${letterCreditRemind}" action="${ctx}/remind/Remind/letterCreditRemindListData" method="post" class="form-inline"
            data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
        </#form:form>
        <table id="dataGrid"></table>
        <div id="dataGridPage"></div>
    </div>
</div>
</div>
<% } %>
<script>
    // 初始化DataGrid对象
    $('#dataGrid').dataGrid({
        searchForm: $("#searchForm"),
        columnModel: [
            {header:'${text("客户名称")}', name:'customerName', index:'a.customerName', width:150, align:"center"},
            {header:'${text("服务订单")}', name:'soCode', index:'d.service_order_code', width:150, align:"center"},
            {header:'${text("资方名称")}', name:'supplierName', index:'e.supplier_name', width:150, align:"center"},
           {header:'${text("车辆名称")}', name:'carName', index:'f.car_name', width:150, align:"center"},
            {header:'${text("操作")}', name:'actions', width:140, sortable:false, title:false, formatter: function(val, obj, row, act){
                        var actions = [];
                        if (row.reminderId){
            actions.push('<a href="${ctx}/financial/arrivalreminder/arrivalReminder/detail?arrivalReminderId='+row.reminderId+'" class="btnList" title="${text("查看")}"><i class="fa fa-file-text-o"></i></a>&nbsp;');
        } else {
            actions.push('<a href="${ctx}/order/serviceorder/serviceOrder/detail?serviceOrderId='+row.soId+'" class="btnList" title="${text("查看")}" ><i class="fa fa-file-text-o"></i></a>&nbsp;');
        }

    return actions.join('');
    }}
        ],
        multiSort: false,  // 是否支持多列排序

        // 加载成功后执行事件
        ajaxSuccess: function(data){

        }
    });

    function goBack(){
        window.history.go(-1);
    }

</script>
